package com.euq.service;

import com.euq.dto.UserDTO;
import com.euq.entity.User;
import com.github.pagehelper.PageInfo;
import org.springframework.http.ResponseEntity;

import java.security.NoSuchAlgorithmException;

public interface UserService {
    ResponseEntity<?> getUserInfo();
    Object login(String account, String password) throws Exception;
    Object register(User user) throws NoSuchAlgorithmException, Exception;
    String findByAccountV2(String account, String password) throws Exception;
    Object updatePwd(String oldPwd, String newPwd, String rePwd) throws Exception;
    User update(User user);
    Object deleteById(Long id) throws Exception;
    Object changeStatus(Long id, long status) throws Exception;
    Object resetPassword(Long id) throws NoSuchAlgorithmException, Exception;
    Object setRole(Long id, String roleId) throws Exception;
    PageInfo<User> getUsers(int page, int size);
    PageInfo<UserDTO> selectUsers(int page, int size, String account, String status, String name);
}
